<<<<<<< HEAD
#include "mywindow.h"
#include "mybutton.h"
#include <QPainter>
#include <QTimer>
#include <myobject2.h>
#include "window2.h"
#include "window3.h"
#include "window4.h"
Mywindow::Mywindow(QWidget *parent) : QMainWindow(parent)
{
    this->setFixedSize(1080,900);
    MyButton*back_bin=new MyButton(":/back.png");
    back_bin->setParent(this);
    back_bin->move(80,40);
    back_bin->setIconSize(QSize(40,40));
    connect(back_bin,&MyButton::clicked,this,[=](){
       emit chooseBack();
    });
    MyButton *first=new MyButton(":/1.png");
    first->setParent(this);
    first->move(200,800);
    first->setIconSize(QSize(50,50));
    window2 *firstscene=new window2;
    connect(first,&MyButton::clicked,this,[=](){
        this->close();
        firstscene->show();
    });

    connect(firstscene,&window2::Back,this,[=](){
        firstscene->hide();
        this->show();
    });
    MyButton *second=new MyButton(":/2.png");
    second->setParent(this);
    second->move(500,800);
    second->setIconSize(QSize(50,50));
    window3 *secondscene=new window3;
    connect(second,&MyButton::clicked,this,[=](){
        this->close();
        secondscene->show();
    });

    connect(secondscene,&window3::Back,this,[=](){
        secondscene->hide();
        this->show();
    });
    MyButton *third=new MyButton(":/3.png");
    third->setParent(this);
    third->move(800,800);
    third->setIconSize(QSize(50,50));
    window4 *thirdscene=new window4;
    connect(third,&MyButton::clicked,this,[=](){
        this->close();
        thirdscene->show();
    });

    connect(thirdscene,&window4::Back,this,[=](){
        thirdscene->hide();
        this->show();
    });
}
void Mywindow::paintEvent(QPaintEvent*){
    QPainter painter(this);
    QPixmap pix(":/bkgd2.jpg");
    painter.drawPixmap(0,0,1080,900,pix);

  }



=======
#include "mywindow.h"
#include "mybutton.h"
#include <QPainter>
#include <QTimer>
#include <myobject2.h>
#include "window2.h"
#include "window3.h"
#include "window4.h"
Mywindow::Mywindow(QWidget *parent) : QMainWindow(parent)
{
    this->setFixedSize(1080,900);
    MyButton*back_bin=new MyButton(":/back.png");
    back_bin->setParent(this);
    back_bin->move(80,40);
    back_bin->setIconSize(QSize(40,40));
    connect(back_bin,&MyButton::clicked,this,[=](){
       emit chooseBack();
    });
    MyButton *first=new MyButton(":/1.png");
    first->setParent(this);
    first->move(200,800);
    first->setIconSize(QSize(50,50));
    window2 *firstscene=new window2;
    connect(first,&MyButton::clicked,this,[=](){
        this->close();
        firstscene->show();
    });

    connect(firstscene,&window2::Back,this,[=](){
        firstscene->hide();
        this->show();
    });
    MyButton *second=new MyButton(":/2.png");
    second->setParent(this);
    second->move(500,800);
    second->setIconSize(QSize(50,50));
    window3 *secondscene=new window3;
    connect(second,&MyButton::clicked,this,[=](){
        this->close();
        secondscene->show();
    });

    connect(secondscene,&window3::Back,this,[=](){
        secondscene->hide();
        this->show();
    });
    MyButton *third=new MyButton(":/3.png");
    third->setParent(this);
    third->move(800,800);
    third->setIconSize(QSize(50,50));
    window4 *thirdscene=new window4;
    connect(third,&MyButton::clicked,this,[=](){
        this->close();
        thirdscene->show();
    });

    connect(thirdscene,&window4::Back,this,[=](){
        thirdscene->hide();
        this->show();
    });
}
void Mywindow::paintEvent(QPaintEvent*){
    QPainter painter(this);
    QPixmap pix(":/bkgd2.jpg");
    painter.drawPixmap(0,0,1080,900,pix);

  }



>>>>>>> 199f3fb0e9bc83f97607ce663cfb658435caaa4f
